import http from 'libs/http';

// 更换手机号短信验证码
export const changeMobileSendSms = (data, success, error) => {
  const url = '/student/info/changeMobileSendSms'
  http.post(url, data).then(success).catch(error)
}

// 更换手机号图形验证码
export const changeMobileValidCode = success => {
  const url = '/student/info/changeMobileValidCode';
  http.get(url).then(success)
}
// 更改手机号
export const changeMobile = (data, success, error) => {
  const url = '/student/info/changeMobile'
  const showErrorNotice = false
  http.post(url, data, {}, showErrorNotice).then(res => { success(res) }).catch(error)
}

// 旧手机号短信验证码
export const validOldMobileSendSms = (data, success, error) => {
  const url = '/student/info/validOldMobileSendSms'
  http.post(url, data).then(success).catch(error)
}

// 旧手机号图形验证码
export const validOldMobileGetImageCode = success => {
  const url = '/student/info/validOldMobileGetImageCode';
  http.get(url).then(success)
}
// 验证旧手机号
export const validOLdMobile = (data, success, error) => {
  const url = '/student/info/validOLdMobile'
  const showErrorNotice = false
  http.post(url, data, {}, showErrorNotice).then(res => { success(res) }).catch(error)
}

